<template>
    <div class="overview-section">
        <div class="stats-grid">
            <div class="stat-card">
                <div class="stat-number">{{ stats.users }}</div>
                <div class="stat-label">用户总数</div>
            </div>
            <div class="stat-card">
                <div class="stat-number">{{ stats.dynamics }}</div>
                <div class="stat-label">动态总数</div>
            </div>
            <div class="stat-card">
                <div class="stat-number">{{ stats.courses }}</div>
                <div class="stat-label">课程总数</div>
            </div>
            <div class="stat-card">
                <div class="stat-number">{{ stats.meetings }}</div>
                <div class="stat-label">会议总数</div>
            </div>
        </div>
    </div>
</template>

<script>
import { ref, onMounted } from 'vue';

export default {
    name: 'Overview',
    setup() {
        const stats = ref({
            users: 0,
            dynamics: 0,
            courses: 0,
            meetings: 0,
        });

        // In a real application, you would fetch this data from an API
        onMounted(() => {
            stats.value = {
                users: 3, // Mock data based on Dashboard.vue
                dynamics: 3,
                courses: 3,
                meetings: 3,
            };
        });

        return {
            stats,
        };
    },
};
</script>

<style scoped>
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 16px;
    color: #666;
}
</style>